package com.algo.GA;

import lombok.Data;

/**
 * @Author: guoxing
 * @Email: gx_study2022@163.com
 * @Description: 保存算法中所有参数的类
 * @Date: 2024/6/11 19:31
 * @ClassName: Param
 **/
@Data
public class Param {

    //表现最大值32767   5676
    public static int MAX=65535;
    //取值范围
    public static int FW=100;
    //个体长度
    public static int INDIVIDUALLENGTH=16;
    //种群大小
    public static int POPSIZE=50;
    //迭代次数
    public static int ITERATIONS=300;
    //交叉概率0.6-0.9
    public static double CP=0.8;
    //变异概率0.001-0.1
    public static double MP=0.1;
    //精英保留个数
    public static int SELECT=2;


    public static void main(String[] args) {
        for (int i = 0; i < POPSIZE; i+=2){
            System.out.println(i);
        }
    }

}
